import config from "@/config"
import http from "@/utils/request"

export default {
	getCustomerList: {
        lists:{
            url: `${config.API_URL}/adminapi/shop.shopCustomer/lists`,
            name: "获取客户列表",
            get: async function(data={}){
                return await http.get(this.url, data);
            }
        },
        add: {
			url: `${config.API_URL}/adminapi/shop.shopCustomer/add`,
			name: "添加客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        edit: {
			url: `${config.API_URL}/adminapi/shop.shopCustomer/edit`,
			name: "编辑客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        delete: {
			url: `${config.API_URL}/adminapi/shop.shopCustomer/delete`,
			name: "删除客户",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    getBrand:{
        lists:{
            url: `${config.API_URL}/adminapi/shop.shopBrand/lists`,
            name: "获取品牌列表",
            get: async function(){
                return await http.get(this.url);
            }
        },
        add: {
			url: `${config.API_URL}/adminapi/shop.shopBrand/add`,
			name: "添加品牌",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        edit: {
			url: `${config.API_URL}/adminapi/shop.shopBrand/edit`,
			name: "编辑品牌",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        delete: {
			url: `${config.API_URL}/adminapi/shop.shopBrand/delete`,
			name: "删除品牌",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
    },
    getGrade:{
        lists:{
            url: `${config.API_URL}/adminapi/shop.shopCustomGrade/lists`,
            name: "获取客户等级列表",
            get: async function(){
                return await http.get(this.url);
            }
        },
        add: {
			url: `${config.API_URL}/adminapi/shop.shopCustomGrade/add`,
			name: "添加客户等级",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        edit: {
			url: `${config.API_URL}/adminapi/shop.shopCustomGrade/edit`,
			name: "编辑客户等级",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        delete: {
			url: `${config.API_URL}/adminapi/shop.shopCustomGrade/delete`,
			name: "删除客户等级",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
    },
    getSettlement:{
        url: `${config.API_URL}/adminapi/config/getAllSettlementMethod`,
        name: "结算方式",
        get: async function(){
            return await http.get(this.url);
        }
    },
    applyLists:{
        url: `${config.API_URL}/adminapi/shop.shopGoods/applyLists`,
        name: "获取供应商商品列表",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
    processPrice:{
        url: `${config.API_URL}/adminapi/produce.workshopManage/produceGoodsLists`,
        name: "工序价格商品列表",
        get: async function(data={}){
            return await http.get(this.url, data);
        }
    },
}
